<extend name="Public:personal_center" />
<block name="content">
	<form method="post" action="{:U('basic_information')}" class="ajax-form">
		<li>
			<span class="tit">账号:</span>
			<div class="txtInfo">{$info['phone']}</div>
		</li>
		<li>
			<span class="tit">昵称:</span>
			<input type="text" name="username" class="user_input" value="{$info['username']}">
		</li>
		<li>
			<span class="tit">头像:</span>
			<div class="txtInfo"><input type="file" name="picture" class="imgInp"></div>
		</li>
		<li>
			<span class="tit">性别:</span>
			<input type="radio" name="sex" <eq name="info['sex']" value="1">checked</eq> value="1">男
			<input type="radio" name="sex" <eq name="info['sex']" value="2">checked</eq> value="2">女
			<input type="radio" name="sex" <eq name="info['sex']" value="3">checked</eq> value="3">保密
		</li>
		<li>
			<span class="tit">QQ:</span>
			<input type="text" name="qq" class="user_input" value="{$info['qq']}">
		</li>
		<li>
			<span class="tit">微信:</span>
			<input type="text" name="wechat" class="user_input" value="{$info['wechat']}">
		</li>
		<li>
			<span class="tit">固定电话:</span>
			<input type="text" name="fixed_telephone" class="user_input" value="{$info['fixed_telephone']}">
		</li>
		<li>
			<span class="tit">联系邮箱:</span>
			<input type="text" name="email" class="user_input" value="{$info['email']}">
		</li>
		<div style="clear: both"></div>
		<div style="text-align: center;margin-top: 20px;">
			<input type="submit" value="保存" style="padding:8px 30px;border-radius: 10px;border: none;">
		</div>
	</form>
	<script>
		function readURL(input,thisimg) {
//	alert(thisimg.parent().prev().prop("tagName"))
			if (input.files && input.files[0]) {

				var reader = new FileReader();

				reader.onload = function (e) {
//			$('#form1').prepend($('<img id="blah" src='+e.target.result+' style="width:100px;height:100px;float:left;margin-right:10px"/>'))
					$('#imghead').attr('src', e.target.result).show();
				}
				reader.readAsDataURL(input.files[0]);

			}
		}

		$(".imgInp").change(function(){

			readURL(this,$(this));

		});
	</script>
</block>
